<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter" %>
<%@ page import="org.springframework.security.web.WebAttributes" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登录页 - <s:text name="context.title"/></title>
	<%@ include file="/common/meta.jsp" %>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link type="text/css" href="css/redmond/jquery-ui-1.8.22.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>
	<script src="${ctx}/js/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${ctx}/js/validate/messages_cn.js" type="text/javascript"></script>
	<script>
		$(document).ready(function() {
			$("#j_username").focus();
			$("#loginForm").validate();
			$("#flashImage").click(function(){   
				  $('#imageF').hide().attr('src','<c:url value="img.jsp"/>'+ '?'+ Math.floor(Math.random() * 100)).fadeIn();   
				});  
		});
	</script>
<style type="text/css">
<!--
body {
	background-image: url(images/login_BG.jpg);
	background-repeat: repeat-x;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #40a0d1;
}
.login_input{
	border-left: none;border-top: none;border-right: none;border-bottom:none;
	height: 25px;
	font-size: 18px;
	width: 150px;
}
.login_submit{
	background:url(images/login.png);
	width:91px;
	height:35px;

}
-->
</style></head>

<body>
<form id="loginForm" action="${ctx}/j_spring_security_check" method="post" style="margin-top:1em">
<input type="hidden" name="yanzheng" value="1"/>
<%
		if (session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) != null) {
	%> 
	<div class="error" style="position: absolute;top: 10px">登录失败，请重试.</div> 
	<%
		}
	%>
	
	<%
		if (session.getAttribute("msg") != null) {
	%> 
	<div class="error" style="position: absolute;top: 10px">验证码错误.</div> 
	<%
		}
	%>
<table width="1200" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/login_01.jpg" width="1200" height="260"></td>
  </tr>
</table>
<table width="1200" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/login_02.jpg" width="1200" height="80"></td>
  </tr>
</table>
<table width="1200" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="320" align="left" valign="top" background="images/login_03.jpg" style="padding-left:545px;"><table width="188" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="48">&nbsp;</td>
      </tr>
      <tr>
        <td height="32">
        	<input type='text' id='j_username' name='j_username' class="required login_input"
					<s:if test="not empty param.error">
						value='<%=session.getAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY)%>'</s:if> />
        </td>
      </tr>
      <tr>
        <td height="25">&nbsp;</td>
      </tr>
      <tr>
        <td height="32"><input type='password' id='j_password' name='j_password' class="required login_input"/></td>
      </tr>
      <tr>
        <td height="20">&nbsp;</td>
      </tr>
      <tr>
        <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="80" height="32"><input name="j_captcha" class="login_input" type="text" style=" width:65px"/></td>
            <td width="6"></td>
            <td align="center"><div id="flashImage" style="" title="点击换下张图">
		<img id="imageF" src="<c:url value="img.jsp"/>" class="required"/> 
	</div></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="60" align="right"><input name="" type="submit" value="" class="login_submit"/></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="1200" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/login_04.jpg" width="1200" height="140"></td>
  </tr>
</table>
</form>
</body>
</html>
